function importMultipleFiles(pattern,where)

%both pattern and where are string variables.
%pattern matches files to look for in the current directory
%where specifies into which *.mat file files will be saved

global files;
files = dir(pattern);

for i=1:length(files),
    eval(['load ' files(i).name ' -ascii']);
end

clear pattern;

save(where);
load(where);
